package com.neuedu.javase;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-09-22 9:39
 * 描述 : 类型转换
 */
public class Operator6 {
    public static void main(String[] args) {

        int numa = 10;

        double numb = 3.14;

        numb = numa;   //自动转换类型
        System.out.println("numb = " + numb);  //10.0  自动转换  隐式转换

        numa = 10;
        numb = 3.14;
        numa = (int)numb;   //强制类型转换
        System.out.println("numa = " + numa);


    }
}
